Repository navigation
fix(deps): bump form-data, proxy-addr, next-auth, MCP SDK and AI SDK in rag-knowledge-agent - #50
Merged
Conversation
…in rag-knowledge-agent Clears Aikido groups 25919954 (form-data 4.0.6), 45888009 (proxy-addr 2.0.8), 37073872 (next-auth 4.24.15), 23398993 (@hono/node-server 2.1.11 via @modelcontextprotocol/sdk 1.32.2) and 30593950 (@ai-sdk/provider-utils 4.0.52 via ai 6.0.287 and @ai-sdk/openai 3.0.115). All stay inside their current majors. SEC-315. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Guillaume Lebedel <guillaume@stackone.com> Co-authored-by: Guillaume Lebedel <10488548+glebedel@users.noreply.github.com>
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Guillaume Lebedel (guillaume@stackone.com).
Why
Aikido flags five vulnerable dependencies in
apps/rag-knowledge-agent: form-data (critical, predictable multipart boundary and CRLF in field names), proxy-addr (critical, IPv4-mapped IPv6 trust bypass), next-auth (critical, three advisories fixed in 4.24.15), @hono/node-server (high, authorization bypass, reached through @modelcontextprotocol/sdk) and @ai-sdk/provider-utils (high, SSRF, reached throughaiand@ai-sdk/openai). Each move is to the lowest version that clears the advisory, inside the current major of every direct dependency.What changed
Two files:
apps/rag-knowledge-agent/package.jsonraises three ranges, andpackage-lock.jsonresolves the fixed versions.^4.24.15^6.0.287^3.0.115Transitive moves that come with them: @ai-sdk/gateway 3.0.197, @ai-sdk/provider 3.0.16, @vercel/oidc 3.2.0, eventsource-parser 3.1.1, hasown 2.0.4, uuid 11.1.1, undici 6.29.1 (new, see below). next-auth's nested uuid 8.3.2 is gone because next-auth now accepts the hoisted 11.1.1. No package was removed from the app's direct dependencies. This supersedes Dependabot #45 (the same SDK bump).
Proof
Run on a clean install of this lockfile:
npm audittotal / critical / highnext build --webpackeslinttsc --noEmitnext start: GET /login, /api/health, /api/auth/providersThe Aikido PR check on this head removes 30 open issues, including the @modelcontextprotocol/sdk,
aiand next-auth's uuid 8.3.2 groups on top of the five above.It adds three on undici 6.29.1 (one medium, recursion; two low, prototype pollution). @ai-sdk/provider-utils has required
undici ^6.28.0since 4.0.48, every current AI SDK release brings it, and 6.29.1 is the newest 6.x: Aikido lists fixes only in 7.x and 8.x. provider-utils loads it in one place,createSafeNodeFetchbehindgetDefaultDownloadFetch, the DNS-checked fetch for downloading URL file parts (dist/index.mjslines 444 to 470). This app sends text messages only, so that path is not reached. Forcing undici 7 with anoverridesentry would break the range provider-utils declares, so this PR leaves it and flags it for a decision.The remaining critical is
nextitself, which Dependabot #49 (next 16.4.6) fixes, along with sharp. hono 4.11.7 is covered by Dependabot #48. pdfjs-dist 4.8.69 stays: react-pdf 9 pins it through @llamaindex/chat-ui, so clearing it needs a react-pdf 10 upgrade, which is a separate decision. The app has no test suite, so build, lint, typecheck and the boot checks above are the regression check.Reviews on this head: Forge (no rewrite needed), security scan (0 findings, no advisory left on any changed package), Codex security pass (0 vulnerabilities),
/security-review(0),/code-review(5 candidates, each answered below), eng-review (0), plus an independent review of the auth and chat code paths against the new versions./code-reviewcandidates and answers: Node 20 is already required by @stackone/ai 2.3.0 (engines >=20.19.6), so the @hono/node-server 2.x floor adds nothing new. hono is on #48. The uuid 11 move on the auth path is covered by the build and the/api/auth/providers200, andgetTokenwas exercised directly on 4.24.15. undici is only used by the SDK's URL download path, which this app never calls. Theaiand@stackone/aipeer coupling predates this change.Risk and rollback
NEXTAUTH_URLover the forwarded host when it works out the origin. If a deployment still has a placeholderNEXTAUTH_URL(asDEPLOYMENT.mdsuggests for a first deploy), OAuth redirects follow the placeholder until it is set.getTokennow returns null on a malformed Bearer header instead of throwing; the middleware already redirects to login on null.What we will watch after deploy
/api/healthreturns 200./api/chatrequest streams a reply with at least one tool call.Opened by Security Autopilot (s2d2) for Guillaume Lebedel from Aikido issue 25919954, under the automatic Aikido fix approval of 2026-11-01.
🤖 Generated with Claude Code
Review gates and proof
Recorded by s2d2 on
019b55e. Kind of change: code.